import 'package:flutter/material.dart';
import 'package:flutter_ncsjqz_getx/http/dio_service.dart';
import 'package:flutter_ncsjqz_getx/model/base_entity.dart';
import 'package:flutter_ncsjqz_getx/util/toast_util.dart';
import 'package:package_get/base_logic.dart';

class GetPasswordLogic extends BaseLogic {
  TextEditingController textEditingControllerTel = TextEditingController();
  TextEditingController textEditingControllerCode = TextEditingController();

  /// todo：发送验证码
  sendAuthCode() async {
    if (textEditingControllerTel.text == "") return toast("手机号未输入");
    Map<String, dynamic> map = Map();
    map['telPhone'] = textEditingControllerTel.text;
    map['smsCodeType'] = 3;
    BaseEntity beanEntity = await DioService<BaseEntity>().getSmsCode(map,);
    if (beanEntity.code == 0) {
      toast("发送验证码成功");
      startTimeDown();
    } else {
      toast("发送验证码失败");
    }
  }
}
